//https://leetcode.cn/problems/palindrome-permutation-lcci/description/
class Solution {
public:
    bool canPermutePalindrome(string s) {
        std::unordered_map<char, int> kv;
        for (auto& e : s)
        {
            kv[e]++;
        }

        int count = 0;
        for (auto& e : kv)
        {
            if (e.second % 2 != 0)count++;
            if (count > 1)return false;
        }
        if (count == 1 && s.size() % 2 == 0)return false;

        return true;
    }
};